import { createRouter, createWebHistory } from 'vue-router'

// 统一在这里声明路由
const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('@/views/Index.vue'),
    meta: {
      title: '小满哥AI机器人首页',
    },
  },
  {
    path: '/chat/:chatId',
    name: 'ChatPage',
    component: () => import('@/views/chat/Index.vue'),
    meta: {
      title: '对话聊天页',
    },
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
